import Vue from 'vue'
import Router from 'vue-router'
import detail from '@/pages/detail/detail'
import Home from '@/pages/home/UserHomepage'
import comment from '@/pages/detail/components/comment'
import like from '@/pages/detail/components/like'
import test from '@/components/test'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/detail/comment/:id',
      component: detail,
      children: [
        {
          path: '/detail/comment',
          component: comment
        },
        {
          path: '/detail/like',
          component: like
        }
      ]
    },
    {
      path: '/test',
      component: test
    }
  ]
})
